#ifndef SCENE_H
#define SCENE_H

#include "ISurface.h"
#include "ViewPlane.h"
#include "Light3D.h"
#include "Vector3D.h"
#include <vector>

using std::vector;

namespace RayTracer
{
    class Scene
    {
    private:
		static const int maxRecursionDepth = 6;
		static float epsilon;
		static float tMax;
		static float tMin;

		ViewPlane viewPlane;
		vector<ISurface*> surfaces;
		vector<Light3D*> lights;
		int recursionDepth;

		bool RayIntersectsSurface(Ray3D *ray,  ISurface *surfaceToSkip);
		HitInfo GetIntersectedSurface(const Ray3D *ray) const;
		Color RayTrace(const Ray3D *ray, float localRefrIndex);

    public:
		Scene();
		~Scene();
		Color GetPixelColor(int x, int y);
		void Resize(float w, float h);
		void AddSurface(ISurface *surface);
		void AddLight(Light3D *light);
    };
};
#endif
